package design.onekey.service;

import com.baomidou.mybatisplus.extension.service.IService;
import design.onekey.base.BaseEntity;
import design.onekey.base.PageEntity;
import design.onekey.model.dto.UserInfoDto;
import design.onekey.model.SysOrg;

import java.lang.reflect.InvocationTargetException;
import java.util.List;
import java.util.Set;

/**
* @Description: SysOrg服务接口
* @author
* @date 2020-06-05 04:03:14
* @version V1.0
 */
public interface ISysOrgService extends IService<SysOrg> , GenericService<SysOrg> {

	/**
	* @Title: tablePagingQuery
	* @Description: 表格分页查询
	* @param @param model
	* @return BaseEntity
	* @throws
	*/
	PageEntity tablePagingQuery(SysOrg model);

	/**
	*<p>Title: getDetail</p>
	*<p>Description: 获取详情</p>
	* @author blcloak
	* @param id
	* @return
	*/
	BaseEntity getDetail(Long id) throws InvocationTargetException, IllegalAccessException;

	/**
	*<p>Title: insert</p>
	*<p>Description: 新增数据</p>
	* @author blcloak
	* @param model
	* @return
	*/
	BaseEntity insert(SysOrg model, UserInfoDto userInfoDto);

	/**
	*<p>Title: update</p>
	*<p>Description: 更新数据</p>
	* @author blcloak
	* @param model
	*/
	BaseEntity update(SysOrg model, UserInfoDto userInfoDto);

	/**
	*<p>Title: delete</p>
	*<p>Description: 单条删除数据</p>
	* @author blcloak
	* @param model
	* @return
	*/
	BaseEntity delete(Long id);

	/**
	*<p>Title: deleteBatch</p>
	*<p>Description: 批量删除数据</p>
	* @author blcloak
	* @param list
	* @return
	*/
	BaseEntity deleteBatch(List<Long> ids);

	 /**
	  * @Method getNextLayer
	  * @Author zhangcheng
	  * @Version  1.0
	  * @Description 查询下一层子节点信息
	  * @Return
	  * @Exception
	  * @Date 2020-6-8 11:36
	  */
	 List<SysOrg> getNextLayer(Long id, UserInfoDto userInfoDto);
	 /**
	  * @Method getOrgTreeById
	  * @Author zhangcheng
	  * @Version  1.0
	  * @Description 根据父节点查询组织机构树
	  * @Return
	  * @Exception
	  * @Date 2020-6-8 13:39
	  */
	 BaseEntity getOrgTreeById(Long id);

	 /**
	  * @Method tablePagingQueryByAuthority
	  * @Author zhangcheng
	  * @Version  1.0
	  * @Description 根据权限查询分页组织
	  * @Return
	  * @Exception
	  * @Date 2020-6-9 10:28
	  */
	 BaseEntity tablePagingQueryByAuthority(SysOrg model, UserInfoDto userInfoDto);

	/**
	 * @Method loadAllOrgByIds
	 * @Author zhangcheng
	 * @Version  1.0
	 * @Description 查询组织机构列表下的全部组织机构
	 * @Return void
	 * @Exception
	 * @Date 2020-6-10 13:31
	 */
	 void loadAllOrgByIds(List<Long> ids, Set<Long> rids);


}
